package com.icinfo.wanandroid.core;

import com.icinfo.wanandroid.core.bean.BaseResponse;
import com.icinfo.wanandroid.core.bean.main.collect.FeedArticleListData;
import com.icinfo.wanandroid.core.bean.main.login.LoginData;
import com.icinfo.wanandroid.core.db.DbHelper;
import com.icinfo.wanandroid.core.http.HttpHelper;
import com.icinfo.wanandroid.core.prefs.IPreferenceHelper;

import javax.inject.Inject;

import io.reactivex.Observable;
import io.reactivex.disposables.Disposable;

/**
 * Author: 胡高建
 * Comment: //TODO
 * Date: 2019-07-24 09:06
 */
public class DataManager implements HttpHelper, IPreferenceHelper {
    private HttpHelper mHttpHelper;
//    private DbHelper mDbHelper;
//    private IPreferenceHelper mPreferenceHelper;

//    public DataManager(HttpHelper httpHelper, DbHelper dbHelper, IPreferenceHelper preferencesHelper) {
//        mHttpHelper = httpHelper;
//        mDbHelper = dbHelper;
//        mPreferenceHelper = preferencesHelper;
//    }

    public DataManager(HttpHelper mHttpHelper) {
        this.mHttpHelper = mHttpHelper;
    }

    @Override
    public Observable<BaseResponse<FeedArticleListData>> getFeedArticleList(int pageNum) {
        return mHttpHelper.getFeedArticleList(pageNum);
    }

    @Override
    public void setLoginAccount(String account) {

    }

    @Override
    public void setLoginPassword(String password) {

    }

    @Override
    public String getLoginAccount() {
        return null;
    }

    @Override
    public String getLoginPassword() {
        return null;
    }

    @Override
    public void setLoginStatus(boolean isLogin) {

    }

    @Override
    public boolean getLoginStatus() {
        return false;
    }

    @Override
    public void setCookie(String domain, String cookie) {

    }

    @Override
    public String getCookie(String domain) {
        return null;
    }

    @Override
    public void setCurrentPage(int position) {

    }

    @Override
    public int getCurrentPage() {
        return 0;
    }

    @Override
    public void setProjectCurrentPage(int position) {

    }

    @Override
    public int getProjectCurrentPage() {
        return 0;
    }

    @Override
    public boolean getAutoCacheState() {
        return false;
    }

    @Override
    public boolean getNoImageState() {
        return false;
    }

    @Override
    public boolean getNightModeState() {
        return false;
    }

    @Override
    public void setNightModeState(boolean b) {

    }

    @Override
    public void setNoImageState(boolean b) {

    }

    @Override
    public void setAutoCacheState(boolean b) {

    }

    @Override
    public Observable<BaseResponse<LoginData>> logout() {
        return mHttpHelper.logout();
    }
}
